package info

import (
	"fmt"
	"github.com/yusufpapurcu/wmi"
)


type Win32_Keyboard struct {
	Availability             uint16
	Caption                  string
	ConfigManagerErrorCode   uint32
	ConfigManagerUserConfig  bool
	CreationClassName        string
	Description              string
	DeviceID                 string
	ErrorCleared             bool
	ErrorDescription         string
	IsLocked                 bool
	LastErrorCode            uint32
	Layout                   string
	Name                     string
	NumberOfFunctionKeys     uint16
	Password                 uint16
	PNPDeviceID              string
	PowerManagementSupported bool
	Status                   string
	StatusInfo               uint16
	SystemCreationClassName  string
	SystemName               string
}

func KeyboardInfo() {
	var info []Win32_Keyboard
	err1 := wmi.Query("Select * from Win32_Keyboard", &info)
	if err1 != nil {

		fmt.Printf("错误:%s\n", err1)
		return
	}
	fmt.Printf("%#v", info[0])
}